home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / ADA / GNAT / !gcc / adainc / 6 / ads / s-interr < prev    next >
Text File  |  1996-02-12  |  6KB  |  124 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --                     S Y S T E M . I N T E R R U P T S                    --
  6. --                                                                          --
  7. --                                  S p e c                                 --
  8. --                           (Compiler Interface)                           --
  9. --                                                                          --
  10. --                             $Revision: 1.6 $                             --
  11. --                                                                          --
  12. --    Copyright (C) 1991, 92, 93, 94, 1995 Free Software Foundation, Inc.   --
  13. --                                                                          --
  14. -- GNARL is free software; you can  redistribute it  and/or modify it under --
  15. -- terms of the  GNU General Public License as published  by the Free Soft- --
  16. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  17. -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
  18. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  19. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  20. -- for  more details.  You should have  received  a copy of the GNU General --
  21. -- Public License  distributed with GNARL; see file COPYING.  If not, write --
  22. -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
  23. -- MA 02111-1307, USA.                                                      --
  24. --                                                                          --
  25. -- As a special exception,  if other files  instantiate  generics from this --
  26. -- unit, or you link  this unit with other files  to produce an executable, --
  27. -- this  unit  does not  by itself cause  the resulting  executable  to  be --
  28. -- covered  by the  GNU  General  Public  License.  This exception does not --
  29. -- however invalidate  any other reasons why  the executable file  might be --
  30. -- covered by the  GNU Public License.                                      --
  31. --                                                                          --
  32. -- GNARL was developed by the GNARL team at Florida State University. It is --
  33. -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
  34. -- State University (http://www.gnat.com).                                  --
  35. --                                                                          --
  36. ------------------------------------------------------------------------------
  37.  
  38. --  Note: the compiler generates direct calls to this interface, via Rtsfind.
  39. --  Any changes to this interface may require corresponding compiler changes.
  40.  
  41. with System.Tasking;
  42. with Ada.Interrupts;
  43.  
  44. package System.Interrupts is
  45.  
  46.    --  Routines needed for Ada.Interrupts
  47.  
  48.    --  Attempt to attach a Handler to an Interrupt to which an Entry is
  49.    --  already bound will raise a Program_Error.
  50.  
  51.    function Is_Reserved
  52.      (Interrupt : Ada.Interrupts.Interrupt_ID)
  53.       return      Boolean;
  54.  
  55.    function Is_Attached
  56.      (Interrupt : Ada.Interrupts.Interrupt_ID)
  57.       return      Boolean;
  58.  
  59.    function Current_Handler
  60.      (Interrupt : Ada.Interrupts.Interrupt_ID)
  61.       return      Ada.Interrupts.Parameterless_Handler;
  62.  
  63.    procedure Attach_Handler
  64.      (New_Handler : Ada.Interrupts.Parameterless_Handler;
  65.       Interrupt   : Ada.Interrupts.Interrupt_ID;
  66.       Static      : Boolean := False);
  67.    --  Calling this procedure with New_Handler = null and Static = True
  68.    --  means that we want to Detach the current handler regardless of
  69.    --  the previous handler's binding status (ie. do not care if
  70.    --  it is a dynamic or static handler).
  71.  
  72.    procedure Exchange_Handler
  73.      (Old_Handler : out Ada.Interrupts.Parameterless_Handler;
  74.       New_Handler : Ada.Interrupts.Parameterless_Handler;
  75.       Interrupt   : Ada.Interrupts.Interrupt_ID;
  76.       Static      : Boolean := False);
  77.    --  Calling this procedure with New_Handler = null and Static = True
  78.    --  means that we want to Detach the current handler regardless of
  79.    --  the previous handler's binding status (ie. do not care if
  80.    --  it is a dynamic or static handler).
  81.  
  82.    procedure Detach_Handler
  83.      (Interrupt : Ada.Interrupts.Interrupt_ID;
  84.       Static    : boolean := False);
  85.    --  Calling this procedure with Static = True means that we want to Detach
  86.    --  the current handler regardless of the previous handler's binding status
  87.    --  (i.e. we do not care if it is a dynamic or static handler).
  88.  
  89.    function Reference
  90.      (Interrupt : Ada.Interrupts.Interrupt_ID)
  91.       return      System.Address;
  92.  
  93.    --  Routines needed to implement pragmas Interrupt_Handler, Attach_Handler.
  94.  
  95.    procedure Register_Interrupt_Handler
  96.      (Handler : Ada.Interrupts.Parameterless_Handler);
  97.    --  This routine should be called by the compiler to allow the
  98.    --  handler be used as an Interrupt Handler.
  99.  
  100.    --  Routines needed for Interrupt Entries
  101.  
  102.    --  Attempt to bind an Entry to an Interrupt to which a Handler is
  103.    --  already attached will raise a Program_Error.
  104.  
  105.    procedure Bind_Interrupt_To_Entry
  106.      (T       : System.Tasking.Task_ID;
  107.       E       : System.Tasking.Task_Entry_Index;
  108.       Int_Ref : System.Address);
  109.  
  110.    procedure Detach_Interrupt_Entries (T : System.Tasking.Task_ID);
  111.    --  This procedure detaches all the Interrupt Entries bound to a task.
  112.  
  113.    --  Routines needed for POSIX dot5 POSIX_Signals.
  114.  
  115.    procedure Block_Interrupt   (Interrupt : Ada.Interrupts.Interrupt_ID);
  116.  
  117.    procedure Unblock_Interrupt (Interrupt : Ada.Interrupts.Interrupt_ID);
  118.  
  119.    function Is_Blocked
  120.      (Interrupt : Ada.Interrupts.Interrupt_ID)
  121.       return      Boolean;
  122.  
  123. end System.Interrupts;
  124.